<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Printer</title>
    <style>
        * {
            margin: 0;
            border: 0;
            padding: 0;
            font-family: "Courier New", Courier, monospace;
        }
        
        #window {
            width: 600px;
            height: 400px;
            background-color: black;
            margin: 100px auto;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
        }
        
        #title-bar {
            width: 595px;
            height: 20px;
            line-height: 20px;
            padding-left: 5px;
            font-size: 14px;
            background-color: #eee;
            font-family: Consolas, serif;
        }
        
        #title-bar span:before {
            content: "\25cf";
        }
        
        #title-bar span {
            font-size: 24px;
        }
        
        #close {
            color: red;
        }
        
        #min {
            color: yellow;
        }
        
        #max {
            color: #00FF00;
        }
        
        tilte-title {
            font-family: 'Arial Black', SimHei;
            font-weight: bold;
        }
        
        #show-board {
            width: 580px;
            height: 360px;
            background-color: #333;
            color: #eee;
            padding: 10px;
            font-family: "Courier New", Courier, monospace, Consolas, serif;
        }
    </style>
</head>

<body>

    <div id="window">
        <div id="title-bar"><span id="close"></span><span id="min"></span><span id="max"></span><strong id="tilte-title">&nbsp;Console</strong></div>
        <div id="show-board"></div>
    </div>

    <script src="javascript/printer.js"></script>
    <script>
        var str = '《贺新生》\n';
        str += '喜迎新瑞，笑初绽，襁褓盈盈惹宠。\n';
        str += '兰蕙添香，天赐福，玉面朱唇轻弄。\n';
        str += '晨露柔光，清风雅韵，喜泪双双共。\n';
        str += '初啼声朗，绕梁三日常颂。\n';
        str += '\n';
        str += '无限锦绣前程，愿君如松柏，岁岁青葱。\n';
        str += '父母心欢，共祝愿，才俊名扬苍穹。\n';
        str += '学海书香，业成德就，百事无忧梦。\n';
        str += '未来辉煌，家和万事齐荣。\n';

        var myPrinter = Printer.init(str, {
            selector: 'show-board',
            lnStr: 'root@chuan ~/ # '
        });
        myPrinter.print()

        
        setTimeout(function() {
            // myPrinter.clear()
            // var str2 = 'Is True\n';
            // str2 += '测试中文字\n';
            // str2 += 'exit\n';
            // myPrinter = Printer.init(str2, {
            //     selector: 'show-board',
            //     lnStr: 'root@chuan ~/ # '
            // }).print();
            window.location.href = 'firework.html';
        }, str.length * 200 + 1000);
        

    </script>
</body>

</html>